package com.charles.seckillData.feignService;

import com.charles.seckillComponentCommon.constants.RoleConstants;
import com.charles.seckillComponentCommon.domain.R;
import com.charles.seckillData.feignFallBack.RemoteAdminServiceFallbackFactory;
import com.charles.seckillData.model.UserLogin;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteAdminService", value = "seckillManagement", fallbackFactory = RemoteAdminServiceFallbackFactory.class)
public interface RemoteAdminService {

    /**
     * 通过卡号查询管理员信息
     */
    @GetMapping("/admin/user/data/{userCard}")
    R<UserLogin> queryUserDataByUserCard(@PathVariable("userCard") String userCard, @RequestHeader(RoleConstants.FROM_SOURCE) String source);


}
